--
-- Author: shunguo.chen
-- Date: 2018-08-17 14:46:38
--
-- BattleGuideRole 战斗引导角色

local fileName = string.getModeName(...)
local ClassRef = class(fileName)

function ClassRef:ctor(data)
    if data then
        self:init(data)
    end
end

-- data = conf
function ClassRef:init(data)
	self._data = data

	self.id = tonumber(data.ID)
	self._mapPositionToTriggerBattle = tonumber(data.mapPos)

	-- avatar params
	local fashions = table.tonumber(string.split(data.fashionIDs, "|"))
	local params = {
		name = L(data.name),
		lv = tonumber(data.level),
		classID = tonumber(data.classID),
		raceID = tonumber(data.raceID),
		gender = tonumber(data.gender),
		hairID = tonumber(data.hairID),
		faceID = tonumber(data.faceID),
		hairColorID = tonumber(data.hairColorID),
		fashionIDs = fashions,
		mountID = tonumber(data.mountID or 0),
		Speed = Constant.MapMoveSpeedNewerBattleGuide,
	}
	self._baseInfo = UserBaseInfo.new(params)
end

function ClassRef:getBaseInfo()
	return self._baseInfo
end

function ClassRef:getId()
	return self.id
end

function ClassRef:getClassID()
	return self._baseInfo.classID
end

function ClassRef:getMapPositionTriggerBattle()
	return self._mapPositionToTriggerBattle
end

return ClassRef
